package com.ask.entity;

public class Order {
    private Integer id;
    private Integer userId;
    private Integer goodsId;

    private Address address;

    // set方法必不可少
//    public void setAddress(Address address) {
//        System.out.println("setAddress method is running");
//        this.address = address;
//    }

    Order(Address address,Integer id) {
        System.out.println("Order constructor is running");
        this.address = address;
        this.id = id;
    }

    public  void printAddress(){
        System.out.println("printAddress method is running");
    }
}
